experiment with attributes
fix wrong handling of session queue and thus the memory leak.