Fix bitrate algorithm