Changed element "actor->components->weapon" to "actor->components->component[type='weapon']"