In a nutshell the refinery problems are hurting the supply of gasoline thus causing the gasoline price to go up while simultaneously reducing the demand for crude at the refineries thereby depressing the price of crude.
Simple economics 101 supply and demand.