coerce logicals to doubles to avoid warning/errors in pdfn