bootstrap: fix a potentional null-dereferencing