Fix bug with resources handling, work on 'pids' field but not in use yet