fix error if no layer is selected under wms