solve some crash bug