Fix onlining and offlining of WMS layers