fix for mods of class inside def