Corrects checking to fix #356.

#356.