puppet bugfix and unit test