fixed crash issues