Fixing update query