Improve client handling