get session selection working correctly