Stabilization of the application. Prevent events to start in wrong situation.
More of similare changes are needed, to be continued.

Signed-off-by: Johan Fredriksson <johanfredriksson1987@gmail.com>