Fixed bug of non-refreshing graphics.