fix bug in check-expression