remove rice and fix the segfaults