fixed empty statement detection; update history table object names