substring mistake again