fixed #7,fixed #8,fixed #14