You should cast to int here.