Fix a bug when loading HTML