fix C stack overflow when trying to resize bars