Fix crash on start up