Fix for bug related with incorrect child class in some JREs.