[BUGFIX] Removing Array.indexOf() calls.