make off() more robust