fix config getting logic