Fix issue history logic error