Fix two minor typos in contrast.py