fixed #61, fixed #63, fixed #65, fixed testcases to work with the config option