Changed updateAttributes to updateAttribute and toJSONString() in toJSONObject()