Fixed bug that was causing the API to return an error when min/max was used (closes #53).