fixed a few bugs with preprocessing headers