Fixed memory leak
Fixed bzip2 support