Another attempt at fixing the same crash