fixed process_running_flag