fix modal cancel issue