Pr/3262 ctypes quad

Some fixes.