Hotfix/nested ternaries

This should fix #118