Session error fix