canceling prompt leads to default variable value