Fixed broken spec as it was reassigning a already declared variable