normalize endings