Changed comparison between integer and enumeration.

This is for #222.