Fixed null error on startup