finish session fix