Fix issue when saving code in provincia