Fix fatal error uninstalling file.

From Platform. Thanks Matias.