some fixes for exec'ing commands