Fixing issues mentioned by @tim.plunkett and @claudiu.cristea