Minor changes to generic.c