fixed bugs related to wron error messages of arrays