#27 nullpointer fix