Buggy and wrong but the rectangles correlate