fix sandbox['max'] variable