fix undefined issue with subject