Fixed a small bug in Exec.