fixed some code in exec.cpp