Add tests for the regression
Fix a regression breaking pkg convert