You remove it here, but the only time you add the border to the layer is in the constructor. So once removed, it can never be added again. This should be moved to the setBorderVisible method which should also be called from the constructor.