fix the cancel button to work again