changed handling click onto button cancel