fix unsigned interger bug
fix reading frame crash sometimes