Had to add qualified calls to head and tail