fix bug for using formatexpr