Fixed performance issue. It was repainting far too much