fix config reading