addItemHtml and appendHtml are the same function and need the same fix.