some fixes in index parsing