ensures all day events are on top and works with python 2.6