fix errors send to api