Fix for overflow errors on exp