Changed nhist fix to use "try: ... except IndexError" blocks.