Why the cast to `int`? Is it possible you get some other value?