fix occasional crash