Fixes crash on start up