fix issues with api