[api] even more fixes for issue 512