fixing integer conversion warnings