Add support for zero percentage
Don't loop when max is zero