Fixed session use in xmlloader