fixed problems caused by instance.java