Fixed a set of bugs which were throwing NPEs due to new columns added.