Cleanup sessions better
Make tracking code line more robust