Fixed typo in tools.py