Fixed patterns so that correct HTML is output