fixed regex bug in package method