updated version. check array out of bounds for component size
added missing resources