fix open paren in while loop