lib.connection make modify more robust