Fix client table function

Client table was seg faulting on multiple clients; should now work with multiple clients