fixed typos in shm.py

Some small stuff I found while searching through the code.