Fix issues #47
Fix complety the issues #47
Merge pull request #50 from Ashrey/master

#47 fix bug