Removed debugging test and setIsAtHead call