Fixed empty attachment issue