Fixing resource order issue