Fixed error from work with session