fixed seg faults with dollar chars