fixed a bug where it was checking the array starting at the second character