Fixed preinstall and dependency trees for deploy and revert