fix bug in proc