Fixes issues with adding characters when adding or refreshing a key.

Signed-off-by: Tyler O'Meara <Tyler@TylerOMeara.com>