how to avoid losing your interactive session