fix scoping issue

this sucker was still using the max value given in the constructor, not the updated value