remove NULL columns in transformations and kill tmp function