Fix HTML ranking bug