fixing core.c