Fixing NullPointer.