fixed wrong sequence of action which causes fail on Windows