fix exception (Unable to cast object of type 'MailApp' to type 'Master')