fixed Resource.java