logic problem in preinst fixed