Fix some problem on configuration reading.