Fixed the reading in of coordiniates if they're invalid