fix config handling