Add cancel button function.