Fixed detached head (sync issues)