- fix sql errors

Signed-off-by: Salja <salja2012@hotmail.de>