fix for inf. recursion