Fixed get_handles function, not returning NULL pointers now.
Fixed size initialization of event count.