Fixed bug on event