Bug fix: sets the buffercounter initial value correctly.