fix bug when read from config file