Fixed issue523 and issue539
Merge branch 'master' of https://github.com/hzahoori/Tarboz into issue523_539
Merge pull request #542 from lilyfan/issue523_539

Issue523 539