fixed regex for avs and fixed error messages