Fix import errors

Fixed some errors that should allow sqlite to import data w/o problems