fixed shell prompt output bug with flush