Fix detach method