Fixed minor bug in checking STEM/Sim limits

Smashed bug #48.