handle some overflow exceptions