fixed linux segmentation fault due to editing read only string