added missing int cast