fixed precedence of 'exit' command