Adding a time limit to sync operations; fixes #112.