CYKLO-984: simplified & corrected newline character recognition
CYKLO-985: fixed attachment data access problem
CYKLO-986: prevent NPE when deleting attachments