Somehow chrome doesn't have startsWith, using indexOf instead.