Fix stack index error in stack instructions