fixed wrong return value of binary api function