fixed error happened after cancel button submitted.