Bugfix: if cmd stack not empty.