Fix NPE on profile diagram creation