Bugfix: Wrong behaviour after deleting file fixed

mantis issue 4286
Cleanup of event handler priorities