# Exam class: wrong \totalpoints [closed]

I have a problem with the exam class. Almost all of my questions have parts and I intend to mention, not only the points given for each part, but also the points total at the beginning of the questions, like thus:

But for some questions (not all, strangely) the \totalpoints command doesn't give out the right points total, even if I compile many times. See what I mean:

The points total for this question is obviously 8, so why does it count 5 points? I first thought it had something to do with the oneparcheckboxes environment, as other questions whose total is wrong have such an environment inside them. But this one doesn't.

The code I used to customise the points appearance is

\pointsinrightmargin
\pointformat{\dots/\themarginpoints}