Merge Fixes
2 bugfixes
Moving braces up.