Improved the handling of preview function parameters.