fixed some stuff in setfreq.c