Merge pull request #3 from mahnunchik/master

some bug fixes and example