fixed the bug about loop play problem