Fixed bug exit