Don't generate ClassCastExceptions when scripts return 0 for double values. Fixes #36.