duplicateprevious bugs are fixed