Fix ClassCastException if user set label expression.