Fix Errors with API Implementation