Fix a bug in expr_len_detection

Fix a bug in expr_len_detection