fixing session bug