Added casting for __init__ methods