fix stack invert