removed unneeded redundant #ifdefs and fixed compiler warning