[BUGFIX] Fix incorrect usage of nested ternary