Fixed issue #676: Image disappears when dragging mouse out of the window