Fixed api issues