Several fixes to cgats parser