make config patch more robust