fix error and remove head