fixed bug with ComponentsPanel painting.