Clean params to remove empty strings and fix the default checkCancel implementation