Is the (int) cast needed here?