         params = [],
         values = [],
         sql,
-        i;
-
-      for (i = 0; i < keys.length; i++) {
+        i = 0;
+
+      while (i < keys.length) {
         args.push(keys[i].toSnakeCase());
         tokens.push("%I");
-        params.push("$" + (i + 1));
         values.push(obj.data[keys[i]]);
+        i++;
+        params.push("$" + (i));
       }
 
       sql = FP.formatSql("insert into fp.%I (" + tokens.toString(",") + ") values (" + params.toString(",") + ") returning *;", args);
+      plv8.elog(NOTICE, sql);
       result = plv8.execute(sql, values)[0];
       delete result.id;
       

      }

      /** Edit columns **/
      for (i = 0; i < obj.properties.length; i++) {
        var prop = obj.properties[i],
          action = prop.action || "add",
          type = prop.type,
          name = prop.name ? prop.name.toSnakeCase() : false,

          Date: "timestamp with time zone",
          Boolean: "boolean"
        },
        props = obj.properties,
        result = true,
        found,
        i = 0;

      if (!table) { return false };

