Fixed max in environment.py