fix a few javascript errors while running tests
too many results displays a friendly error msg