Fixed the cornerbar generation (was doubling the bars in some cases)