Oil pares gains, but ends higher after Friday slump