fix some crash reasons