fixed some infinite recurrences