Oil ends lower due to high inventories