fixed some issues with the api re-factor