Theoretical Notes on Portal Repair