fix setapi
Merge pull request #4 from francescolaffi/master

fix setapi