Fixed bug in events controller