fixed errors

Fixed missing or misplaced brackets.