A few fixes, some more logging.