api fix for issue #291

api fix for issue #291