fixing key serialzation when using boolean values