crash on inv thread fix