fix REST exec-scripts bug