Changed old array index 0 to plain object looking when checking resources...