Fixed contact sync handler

fixes #627