fixed dependency and added preinst scripts