Added code to handle overflows