bug fix: fix error processing the frames