adding a fix for overflow