diff --git a/mutalyzer/entrypoints/admin.py b/mutalyzer/entrypoints/admin.py
index d0458dbe941361748826d414be02172f869faf4b..c48b96d39ab4df782dcb162f44d2c5cdc982f215 100644
--- a/mutalyzer/entrypoints/admin.py
+++ b/mutalyzer/entrypoints/admin.py
@@ -294,6 +294,7 @@ def main():
         '-H', '--history', metavar='DAYS', dest='history', type=int,
         default=7, help='number of days to go back in the remote cache '
         '(default: 7)')
+    p.set_defaults(func=sync_cache)
 
     # Subparser 'setup-database'.
     p = subparsers.add_parser(
diff --git a/mutalyzer/sync.py b/mutalyzer/sync.py
index 2122385919d8e2be8790ec1087dc0a4e0b249a0f..40c64c57212be8b7cbcfdd5aa79025e8d31820b3 100644
--- a/mutalyzer/sync.py
+++ b/mutalyzer/sync.py
@@ -5,10 +5,12 @@ Module for synchronizing the database with other Mutalyzer instances.
 
 from mutalyzer.util import monkey_patch_suds; monkey_patch_suds()
 
+from datetime import datetime, timedelta
 import os
 import re
-from datetime import datetime, timedelta
 import urllib2
+
+from sqlalchemy.orm.exc import NoResultFound
 from suds.client import Client
 
 from mutalyzer.config import settings