Was not syncing heads in many cases

Not entirely sure this is the best way to do this because it
sort of makes some assumptions. It works better than not,
though, as in many (most/all?) cases only master would get
synced.

Thansks to @yuters for pointing this out.

Closes #5