Fix for the ternary operation not behaving correctly.

* Fix for the ternary operation not behaving correctly.
* Change the tests port that conflicted with others.