small fixes and it will only work on  puppet version >= 3.0