remove head and error fix