Fix import account script
Fix issue with audit query being too long because of use of lower sql function