Corrected how session variables are read.