try to fix the end bad exit, not working.