Fixed issue in extracting package name from rule