Fix the syntax issue with if blocks