Fixed a bug with where