fixed unit tests (added an async flag to get around the async clock notification); fixed bugs