Fix for auto exit