bugfix - new line chars disappears in replacement