fix bracket in if statement