Fixed usage of ternary operator