fixed if(maximumValue == 0) statement