Fixed bug on WMS layer creation