Fixed Resource bug