Make sure detach has the right context here too