fixed KVP not properly removing the new line