Fixes bug with string values being replaced by nil