fixed foldr