Fixed <= instead of >=
2 more fixes due to bad copying