Problem with the order of events