fix bug applying config