Fixed exec, refs #38.

This was a part of #344.