Added proper control on exit(), and compat with lua's '='.