MP bugfixes

Worked around MOAI encoding empty table as object instead of array.
Fixed 1-based index to 0-based index conversion bug