Tiny fixes for recent commit in exec() function