added safety for jvm