Fixed a typo ($x -> $ex)

There is a typo at line 7