fix for missing WHERE string