Session library bug fixes