added check on non-existing events in event table
fixed bug in errorhandler