More fixes for wms and TODO