Fixed calculation issue by sessionId