Fixed casting classes