small SQL changes
fixed labels