Fix bugs in bootstrap-shell