minibuffer.js: fix bug in remove_state