fixed JS exit?