sorted out session running time bug