Fixed Nullpointer exception.