fixed the patches list to end when it should