Added methods to change dispatcher and session.