avoid expensive math operations (logn)
fix for new empty result code
force refresh if single field is requested
Merge pull request #23 from john30/master

avoid expensive math operations (logn)