added safety check

had an issue with a mod, this fixes it