fixing string detected as improperly formatted