Fixing a bug, WHERE condition was missing