Fixed engine out of memory error. Fixes #20 (man, I create these issues to remind myself later on and then fix them after 5 minutes)