minor sql fix