this fixes #301: many silly bugs broke local mirroring