fix tests in api_test.go
fix run