Better errorhandling in event