fix a bug that ignore the 'where' when update