Fix for the ternary operation not behaving correctly.

* Fix for the ternary operation not behaving correctly.
* Change the tests port that conflicted with others.
What's with the port change?