cancel button bug fix