Feature/public key ring fix

update #18 after comments.