added correct exit procedure call