Fix some more border cases.