Fixed NULL field issues