Added explicit casting to Class to support Embeds