Added global variable to indicate mission has ended