Fix date and add ticket remain function