fix NPE in rating