Fixing some api issues