Re-attempt at fixing frame error