fixed db select for clients