fix normalize to handle more than ARRAY_MAX expressions