bugfixes and config file