Fixed the end address bug

Since it was looking at whether it was equal to, this does not always
work, because it doesn't account for addresses that are bigger than the
end addresses. Bug is fixed.