bugfix with api
Merge pull request #669 from inc0/api

bugfix with api