Fix a bug on sessions cleaning