Oil gains as US production slowly returns after freeze