Fix for events order.
Cleanup.