Bug fix for issue #28

Bug fix for issue #28