Fixing privkeys and stuff