fixing several bugs
Merge pull request #10 from keevitaja/2.2

fixing several bugs