Fixing bug with Update statement