fix frame bug