Fix a bug that 0 points reads as 1 and 0 points crashed the code