fix a bug that causes vi to exit with non-zero status