fixed repainting objects and resources