Fix negative frequency problem

Closed #75