Fix order of isTrigger check

This prevents it from always returning true.
Merge pull request #4 from iangreenleaf/fix_trigger_check

Fix order of isTrigger check