Fixed bug on adding single event. Improved general conditions check on main loop