Fix logic error in schedule filter