Addition of a protection against int overflow