fixing HEAD lines