Fix issue #9

Fixes issues #9

Please wait for testing before merge.