reordered drawing and clearing the local cache