Fix bug with process index in monit task