Fix order of isTrigger check

This prevents it from always returning true.