check if attached before routing