Fixed the update query