fix bugs && add gnupg support