Updated to sanitize parameters.