expanding ternary expressions fixes #272

See issue #272