fixed NPE in assertion