Fix stack parsing