Fix for numerical errors when merging events for the same level, clean
up