fix frame restoration