fix for public_key: was duplicated code

duplicated code - my mistake during edition