my speed fix left undefined nrel_max variables, so i defined them.