-
minor sql fixes