Trying to fix detach