fixed recursive stat