Fixes bug with KeyError in bootstrap