This looks suspicious. `versions` is already a list but you're passing it as a list of lists. 
How did that ever work? Did you test it manually?