Fixed wrong ternary statement

Mixed up boolean with assignment statement. Corrected.