[KWM] Fixed sql error