[BF] fix wrong calculation