Fixed ISA algorithm bugs