fixed the update statment