Fix to delete schedule bug