corrected a few bugs with special characters