Fix bug when hpm is installed