Fix bug for declarations with multiple type objects