Spiffed up melt/cast to handle all cases.