Corrected error checking in addPoints