fix loophole with untitled sketches and mode changes