Fixes issue where integer keys are lost