Avoid undefined errors when the mod is disabled

Signed-off-by: Suki <suki@missallsunday.com>