Oil up from four-month lows, inventories curb recovery