add remove-last-seperator windows version, and fix bugs