failed to maintain pointer to the head