[Ayanga] fixed js that broke event creation