Fixed bug in read config