Fix problem with double and int queries.

Closes #35