fixed issues with null values and past events