Fix the crash..but still hangs