Update data.py

Fixed bug pointed out by Charles