Terminates properly