fixed frame bug