Reflecting changes from "haxxxx"

Applying the same changes "haxxxx" made on his forked project. Dunno what really changed, but since he used to be active doing the request pulls and were good changes, I believe this could help somehow.
Merge pull request #206 from nishikazuhiro/patch-8

Reflecting changes from "haxxxx"