Fixing session bug