Critical frame bug fix