Fixes https://github.com/GeoNode/geonode/issues/1261