Fix bugs with hex packaging