Fix bugs for kaminari