Lua page error handling cleanup

- mg.onerror returning non-zero wasn't stopping processing as it was supposed to, fixed.
- Removed a line of dead code.