fixed config parsing bugs