fixed crash on crash