magic_recursive patch