fix mistakes made when copying changes from pardot version of library