Fix for issue #61

Change AND to WHERE.
Merge pull request #62 from kec2/patch-1

Fix for issue #61