Remove some logging and fix a bug.