Fixed NullPointer exception when not defining properties