Fixing NPE on startup