Added guard on limit == 0 not to do remote call.
Clean up in build.