Bug fixes, logging.