put closing paren in correct place