fix endings