a little fixes

events.php fixes, for more information, please see the diff info