Fix exception error on empty stack pop