fix bug related to head files