fixed preUpdate method