fix bugs
Merge pull request #24 from DmitryVoskoboynikov/fix_bugs

fix bugs