coped with error when posting and corrected api