Fixed nullpointer.