bug when string is empty