fixed client instansiation