Fix cast problem with implicit constructors.