various fixes for r_modular examples