Fixes Avoid Nested Blocks

Fixes the medium flag CodePro error: Avoid Nested Blocks

Author: Shockolate