Bug fix

Dealt with issue #18