fix issue with exec and dir