Fix for a problem with bottom corners.
Code cleanup.