fix protential crach issue