Fixed non-working modulo division