small fixes in datastructures.py