Fixed errors with exportState and getTile of WMS layers