TS: Fixed crash when debugging