Fixed two bugs in DeallocateFrequency