fixed issue when frequency was set to 0