Fixed an issue with where a statement would never get returned.