Added queue handling to session