casting to an unspecified depth now preserves original depth instead of using native depth