fixes possible incorrect frame