Fixes for adapting to old api