The data removed from the stack is not the expected data. The expected data is the Smallint value. Either the Smallint value is not at the top of the stack or the stack is empty.
Ensure that the Smallint value is being placed on the stack or there is enough storage for the stack.