Liutyi fixed bugs with negative values in ReadConfig