avoid reverting the border if it's not necessary (avoids some flashing on view())