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