Add option to skip detach on sync.
Merge branch '4.0'