Fixed bugs.

Implementing where select