fix xhead procedure