Fix handling of instance of client