Fixed email exception for arrayindex out of bounds.