ifdefs corrected