Fixed program counter bugs