Fix bugs
Merge pull request #25 from mirrorcoder/master

Fix bugs