Fix a weird bug and optimize code
Merge pull request #13 from AnyFetch/new-lib

Fix a weird bug and optimize code