fix issue where x would be evaluated twice.

same issue #352