Fix int overflow