almost running - small bug when exiting