error handling when setting overlays closes #592