fix build on *nix due to wrong type in ternary operator