Fix/select where

I created the unit test, to show what I thought about the change.