Important type fix in preUpdate script