Ignore "end" if a function is ended with "exit"