Fixed bugs in prevent update method