keystore fixes from Habib