Fix for saving existing model without validation errors
Syntax error in buildQuery fixed
Removed unnecessary temp.