small fix to HD key generation