Municipal election loophole will be fixed, premier says