bug fix in settings when cancelling