Fixed logic in webservices module.