fix generating configs - use map instead of each