fixed "head" problem