Avoid using session variable directly