fixed HEAD bug, init bug