some minor fixes/ more logging.