Fix issue #27

This patch is for issue #27.
Maybe, It will work with this changes.

Could you try to confirm them?

Thanks.