fix to infinite recursion crash