Get inserts to work on empty table. Fix some bugs that broke inserts on Hive tables...