Fix #296.
Fix #298.