Fix head issue in sync