fix to substr