CG-2786: Fix for incorrect parameter been passed to getopt