Fixed jre6 incompatibility