fixed issue with ternary