small fix for some weard crash bug