fix replacing empty string with empty string