fix frame lag issue