Fix error in update sql query