fixed code not being evaluated correctly