fixed issue #47, took longer than expected ._. so sad