added safety check

had an issue with a mod, this fixes it
Merge pull request #847 from Need4Speed402/patch-3

added safety check