bug fix for mod