bugfixes
Merge pull request #132 from andhieka/working

bugfixes