Fix invalid input for third argument of kernelULong and kernelLong case.