LAYERS parameter cast to string

Code assumed a string type to make a replace operation. It failed
when LAYERS is a unique number (typical of layers from ArcGIS services).