bug fix and packaging