Few minor bugfixes
Merge pull request #3 from AriaMinaei/master

Few minor bugfixes