bug in crash method