Fixing crash on startup