fixed major bug in branch comparison

the old code did a string comparison with == which is obviously wrong.
fixed checkstyle
Merge pull request #16 from rburgst/fix-comparison

Fix comparison