Fixes index out of bounds exception in call history service.