Fixed problem with last session going out of bounds