fixed a small bug so that getExpr can work properly