Fixed where filter method if properties hash is provided.
Added test for where filter.