Bug fixes for attaching emails to case