Fix for issue #120

Fix for issue #120. 

WHERE clause would use QUERY instead of SCAN when there is the key passed as argument.