try to give the cancel button a function