Fix bug by Weikun.