Fixed filesystem-related crashes (I think)