remove #undefs from apply.c