Fixed bugs in extreme cases.