Fix the preview deprecation warning

See issue 3919.