Fix potential bug.
Copy and paste resolution code.