attribute bug fix and refactory getResourceid