Fixed bug that caused funciton to return wrong result if there was an int in the string