fixed preinstall and postinstall