fixing some problems and removing bypass of invalid events