Fixed exit

Exit was always exiting 0