Fix non-empty stack assertion error.