Mod operations fix