fixing osx lua not interpreting ret codes correctly

Solves #2