Fixed to work with recent rust master