Fixed startup race bug with shell/cycript terminals.