Fixed batch insert adding too extra records
Fixed dropping tables for formuladefs = null