fix code occurrence edit and upload issues