Fixes for latests API changes