fixed bug with adding multiple events to object

for..in will return the index instead of value in Array