Fix the syntax error
fix the "is not object" error

You can do insert and updates without errors
Merge pull request #2 from Kerosene2000/patch-2

Patch 2