Hopefully fix some crashes on startup