fixed string select gate

fixed mistake in string select gate and optimized string length