fix some errors for event adding