Update engine.js

I think your variable names were wrong...