lot of small fixes
Merge pull request #1 from vovkvlad/fixes

lot of small fixes