Fixed a problem with premature disappearance of objects on the screen (second revision).