repackage and fix minor bug