Fix NPE on deleted project