Merge pull request #21 from nikola-benes/master

Fixed some bugs.