correct substring error for content