Fixed error when running in double precision
Merge pull request #564 from peastman/master

Fixed error when running in double precision