fixed forgotten substr