fixing references to instance that should be to client