add bzip2 and fix tests