Fix issue #11

Please test the fix, I didn't tested it.