fixed Resource bug