Mod functions updates and fixes