Added fitness check to reduce number of instructions executed.
Resulting output no longer contains rubbish characters and program now terminates.