Fixing excess curly bracket

I discovered an excess curly bracket which was introduced by the merge and hindered the compilation. This pull request fixes this problem. Also wrote an if-condition more clearly using brackets.

Thanks,
Thomas