Added function for cancel button