fixed a bug in update method which prevented the query from execution