Subsrtring fix