Fixing an error. Can't indexOf an object.