Fixed a bug with the duplication check in refreshService