Handling frame corruption