Code improvement for the subject/body separation.

Previous code assume that array is not empty while current one works even if array is empty.