* commit 'fc441bfff9eb68be08eb922ea05c78c5d6fba27a': Fix some problems with moving in and out of detached state.