fix issue while scheduling event