fixes and improvements
Merge pull request #114 from ihptru/master

fixes and improvements