Fix javac type erasure issue.