fixing api issue

Fixes issue #32