Fix bug in jvm memory