minor fix

Hey Stepan, 
I made some changes to fix problems that I run into when used your library

Roman