Fix for #347
Merge pull request #367 from hav3n/branch-fixes

Fix for #347