Fixed some errors that would result in no results!

Changed some more stuff too.