Fix syntax error with ternary operator

Signed-off-by: Kaustav Das Modak <kaustav.dasmodak@yahoo.co.in>