Youku: fix #331, refactoring