fixed uid problem during script execution