Updated nat.py to remove index out of bounds error