Fix some bugs on SAM AV1