fixes crash on boot