Bugfixes on preprocessor