fixed bug with missing attachment contentId
change contentId generation scheme