fix bug with current process detection