Add `pre_install` method and fix some mistakes