fixed javascript bug where pass and fail functions passed in were not returning all objects