Fix to new api