fix bugs in log
fix bug in init_from_settings.patch