Avoid nested go blocks

Minimize go block boundary to prevent compilation issues